package com.itheima.dubbo.consumer;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.dubbo.api.HelloApi;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerController {
    @Reference
    private HelloApi helloApi;

    @GetMapping("/dubbo")
    public String helloDubbo(@RequestParam String username){
        return helloApi.hellodubbo(username);
    }
}
